package com.baidu.controller;

import com.baidu.entity.Category;
import com.baidu.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/category")
public class CategoryController {
    @Autowired
    private CategoryService categoryService;

    //查询全部
    @RequestMapping("/findAll")
    public List<Category> findAll(){
        return categoryService.selectAll();

    }

}
